mtx_pinverse Interface

public interface mtx_pinverse

Module Procedures

private pure function mtx_pinverse_dbl(a, tol) result(ainv)

Computes the Moore-Penrose pseudo-inverse of a M-by-N matrix using the singular value decomposition of the matrix.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: a

The M-by-N matrix to invert.

real(kind=real64), intent(in), optional :: tol

An optional input, that if supplied, overrides the default tolerance on singular values such that singular values less than this tolerance are forced to have a reciprocal of zero, as opposed to 1/S(I). The default tolerance is: MAX(M, N) * EPS * MAX(S).

Return Value real(kind=real64), allocatable, dimension(:,:)

The N-by-M inverted matrix.

private pure function mtx_pinverse_cmplx(a, tol) result(ainv)

Computes the Moore-Penrose pseudo-inverse of a M-by-N matrix using the singular value decomposition of the matrix.

Arguments

Type IntentOptional Attributes Name
complex(kind=real64), intent(in), dimension(:,:) :: a

The M-by-N matrix to invert.

real(kind=real64), intent(in), optional :: tol

An optional input, that if supplied, overrides the default tolerance on singular values such that singular values less than this tolerance are forced to have a reciprocal of zero, as opposed to 1/S(I). The default tolerance is: MAX(M, N) * EPS * MAX(S).

Return Value complex(kind=real64), allocatable, dimension(:,:)

The N-by-M inverted matrix.